<%@ page contentType="text/html;charset=utf-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>


<html>
<head>
	<style type="text/css">
	body { font-family:"华文楷体";
           color:blue;
            font-size:30px;
     }
     </style>
</head>
<body>
	<form name="form" method="post" action="success.jsp">

		<%
	
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		
	
		ArrayList cun = new ArrayList();
		List list=(List)session.getAttribute("cun");
		String fruit[] = request.getParameterValues("checkbox");
		for (int i = 0; i < fruit.length; i++) {
			cun.add(fruit[i]);
			
		}
		cun.add(list);
		session.setAttribute("cun", cun);
		out.print(cun);
		
    	
		
		
		/*
		ArrayList cun = new ArrayList();
		ArrayList list = new ArrayList();
		cun.add(list);
		
		session.setAttribute("cun", list);
		session.getAttribute("cun");
		out.print(list);
		out.print(cun);
		
	
		*/

		
		%>
		<input type="submit" name="b" value="提交"> <a
			href="look.jsp?type=a">返回菜单</a>
	</form>

</body>
</html>
</html>